import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import uView from "uview-ui";
import {router,RouterMount} from './router.js'  //路径换成自己的
import store from 'store/index.js'
let config;

if (process.env.NODE_ENV === 'development') {
  config = require('./config/dev.config.js').default;
} else {
  config = require('./config/prod.config.js').default;
}

Vue.prototype.$config = config;
Vue.prototype.$store = store
Vue.use(router)
Vue.use(uView);
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App,
  store
})
//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
	RouterMount(app,router,'#app')
// #endif

// #ifndef H5
	app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif